<template>
  <div class="pop-pu2" v-draggable>
    <el-dialog title="拖拽" :visible="dialogVisible" :before-close="handleClose" v-draggable :modal="false">
    
      <slot></slot>
      <span slot="footer" class="dialog-footer">
        <!-- <el-button @click="dialogVisible = false">关闭</el-button> -->
      </span>
    </el-dialog>
    <!-- <div style="width: 200px;height:200px;background-color: red;" class="dialogDrag">
      <slot></slot>
    </div> -->
  </div>
</template>

<script>
import draggable from './draggable.js';

export default {
  directives: {
    draggable,
  },

  props: {

  },
  data() {
    return {
      dialogVisible: true,
     
    };
  },
  methods: {
    handleClose(done) {
      this.dialogVisible = false; // 关闭对话框
      // this.$emit("closeDialog", this.inputData);
      done(); // 执行关闭操作
    },
  },
};
</script>


<style>
.pop-pu2 .el-dialog__wrapper {
  height: 300px;
  width: 400px;
  background-color: blueviolet;
  border: 1px solid black;
  padding: 0;
  margin: 0;
  /* display: none; */
}

.pop-pu .el-dialog__wrapper .el-dialog{
  height: 100%;
}
</style>